#ifndef CAFFEINE_UTILITY_CREATOR_HPP
#define CAFFEINE_UTILITY_CREATOR_HPP

#include "Common.hpp"

namespace Utility
{
	template< typename Base >
	class BaseCreator
	{
	public:
		BaseCreator( void )
		{
		}

		virtual ~BaseCreator( void )
		{
		}

		virtual Base *Create( void ) = 0;
	};

	template< typename Base, typename Class >
	class Creator : public BaseCreator< Base >
	{
	public:
		Creator( void )
		{
		}

		virtual ~Creator( void )
		{
		}

		virtual Base *Create( void )
		{
			return new Class;
		}
	};
}

#endif //CAFFEINE_UTILITY_CREATOR_HPP